﻿using SpaceNeedle.City6473.Web.Data.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SpaceNeedle.City6473.Web.Data.Repositories
{
    public class AppRepository : SpaceNeedle.SDK.Web.Data.EntitiyFrameworkRepository<App>
    {
        public AppRepository() : base(new City6473Entities())
        {

        }

        public override App GetById(Guid id)
        {
            return this.GetAll().Where(x => x.Id == id).SingleOrDefault();
        }

        public override App GetById(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return null;
            }

            return this.GetById(new Guid(id));
        }
    }
}
